

//@flow

/**
 * 目前支持的第三方
 */

import { ThirpPartType } from "./modal";
import * as WeChat from "react-native-wechat";


export const THIRD_PART_LIST : Array<ThirpPartType> = [
    {
        platform:'wx',
        configKey:'WX_APP_ID',
        installCheckAction:()=>{
            return WeChat.isWXAppInstalled().then(res=>{
                console.log(`微信在当前设备是否安装：${res}`)
                return res;
            }).catch(registerErr=>{
                console.warn(`微信安装检查失败:${registerErr}`)
            })
            // return Promise.resolve(true)
        },
        iconName:'wechat'
    },
    {
        platform:'ali',
        configKey:'ALIPAY_APP_ID',
        installCheckAction:()=>{
            console.log('还未设置alipay安装检查代码')
            return Promise.resolve(false)
        },
        iconName:'alipay-circle'

    }
]